package com.tencent.iov.cowin.befsale.clue.service.cus;

import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.ClueIntentionGradeDataRequest;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.QueryCustomerRequest;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.UpdateCustomerRequest;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.response.CustomerResponse;
import com.tencent.iov.cowin.befsale.clue.domain.cus.po.OemCustomer;
import com.software.boot.common.model.dao.PageRequest;
import com.software.boot.common.model.dao.PageResponse;

import java.util.List;

/**
 * @Describe: 总部客户表主表+客户好友关联表_Service接口层
 * @author: xiamu
 * @created: 2021-12-21 18:37:23
 * @version: 1.0
 */

public interface OemCustomerService {

    /**
     * 通过ID获取详细信息
     *
     * @param id 主键ID
     * @return CustomerResponse对象
     */
    CustomerResponse getDetailById(Long id);

    /**
     * 单条数据插入OemCustomer
     *
     * @param request
     * @return 插入的条数
     */
    int insert(OemCustomer request);

    /**
     * 批量插入OemCustomer
     *
     * @param requests
     * @return 批量插入的条数
     */
    int insertBatch(List<OemCustomer> requests);

    /**
     * 单条OemCustomer更新
     *
     * @param request 更新参数
     * @return 更新的条数
     */
    int update(UpdateCustomerRequest request);

    int updateById(OemCustomer oemCustomer);

    /**
     * 通过ID删除数据
     *
     * @param request
     * @return 删除的条数
     */
    int delete(OemCustomer request);

    /**
     * 根据条件查询对象list列表
     *
     * @param request
     * @return 查询结果
     */
    List<CustomerResponse> getListByParam(QueryCustomerRequest request);

    /**
     * 根据条件查询对象Page记录
     *
     * @param request
     * @return 查询结果
     */
    PageResponse<OemCustomer> getPageByParam(PageRequest<OemCustomer> request);

    /**
     * 根据条件查询单个对象
     *
     * @param request
     * @return
     */
    CustomerResponse getOneByParam(OemCustomer request);

    /**
     * 查看用户是否存在活跃线索
     * @param phone
     * @return true 存在活跃线索  false
     */
    Boolean checkCustomerPhone(String phone,String dealerId,String tenantId,String corpId);

    /**
     * 更新总部客户信息与标签信息
     * @param updateCustomer
     * @return
     */
    Boolean updateOemCustomer(UpdateCustomerRequest updateCustomer);

    /**
     * oneId是否存在验证
     * @param oneId
     * @param dealerId
     * @return
     */
    String checkOneId(String oneId, String dealerId, Long followEmpId,String tenantId,String corpId);

    /**
     * 获取客户转线索的数量
     * add by zly
     * 2022-01-15
     * @param clueDataRequest
     * @return
     */
    Long getEmpBindCount(ClueIntentionGradeDataRequest clueDataRequest);
}